package behavioral.memento;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 管理者
 * @Author: lxt
 * @CreateDate: 2019/11/1
 **/
public class Caretaker {
    private Map<String, Memento> mementoMap = new HashMap<String, Memento>();

    public Memento getMemento(String key) {
        return mementoMap.get(key);
    }

    public void putMemento(String key, Memento memento) {
        mementoMap.put(key, memento);
    }
}
